/*
 * @Description: element-plus(第三方插件)
 * @Author: hmt
 * @Date: 2022-08-17 10:24:19
 * @LastEditors: hmt
 * @LastEditTime: 2024-03-27 10:38:02
 */
import type { App } from 'vue'
import Element from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/es/locale/lang/zh-cn'

const el = document.documentElement
el.style.setProperty('--el-font-weight-primary', '400') // 覆盖font-weight
el.style.setProperty('--el-color-primary', '#1779ff') // 覆盖主题色
el.style.setProperty('--el-color-success', '#2abe90') // 覆盖成功色
el.style.setProperty('--el-color-warning', '#efa400') //  覆盖警告色
el.style.setProperty('--el-color-error', '#ff4d4f') //  覆盖错误色
el.style.setProperty('--el-color-danger', '#e73535') //  覆盖错误色
el.style.setProperty('--el-color-black', '#3a3a3d') // 覆盖黑色
el.style.setProperty('--el-overlay-color-lighter', 'rgba(0, 0, 0, .6)') // 弹窗背景色

export default (app: App) => {
  app.use(Element, {
    size: 'default',
    locale
  })
}
